package com.example.design.observer.rate.concreteobserver;

import com.example.design.observer.rate.observer.Company;

/**
 * @Description 进口公司-具体观察者
 * @ClassName ImportCompany
 * @Author Yumuhui
 * @Date 2020/5/16 0:22
 * @Version 1.0.0
 */
public class ImportCompany implements Company {
    @Override
    public void response(double rate) {
        if(rate > 0) {
            System.out.println("人民币汇率升值" + rate + "个基点，降低了进口产品成本，提升了进口公司利润率。");
        } else if(rate < 0) {
            System.out.println("人民币汇率贬值" + (-rate) + "个基点，提升了进口产品成本，降低了进口公司利润率。");
        }
    }
}
